const commodityDao = require('../dao/commodityDao');
// 条件查询
module.exports.find = async function (searchObj, page) {
    return await commodityDao.find(searchObj, page);
}
module.exports.findAll = async function () {
    return await commodityDao.findAll();
}
// 增加
module.exports.addCommodity = async function (commodity) {
    return await commodityDao.addCommodity(commodity);
}
// 删除
module.exports.delCommodity = async function (id) {
    return await commodityDao.delCommodity(id);
}

// id查询
module.exports.commodityById = async function (id) {
    return await commodityDao.commodityById(id);
}
// 修改
module.exports.updateCommodity = async function (id, commodity) {
    return await commodityDao.updateCommodity(id, commodity);
}